package samsung.sds.business.vdiManagementSystem.firewallManagement.service;

import java.util.List;
import java.util.Map;

import samsung.sds.business.vdiManagementSystem.firewallManagement.model.FirewallEntity;
import samsung.sds.departmentManagement.model.DepartmentEntity;
import samsung.sds.system.common.baseQuery.BaseServiceInterface;
import samsung.sds.system.common.baseQuery.model.PageData;
import samsung.sds.system.common.model.QueryParam;


/**
 * @author hongxin.luo
 * @createDate 2016-04-21
 *
 * 防火墙管理Service
 */
public interface FirewallManagementService extends BaseServiceInterface<FirewallEntity>{
	
	/**
	 * 查询组织结构与部门下的VDI信息
	 * @return
	 */
	List<DepartmentEntity> queryDepartmentVDI();
    
	/**
	 * 查询VDI下的所有防火墙信息
	 * @param param
	 * @return
	 */
	PageData<FirewallEntity> queryFirewallInVDI(QueryParam param);
	
    /**
     * 删除VDI下的防火墙信息
     * @param lastModifyUser
     * @param firewalls
     * @return
     */
	int updateFirewall(String lastModifyUser,String[] firewalls);
	
	/**
	 * get vdi tree information.
	 * @return
	 */
	Map<String, List<?>> getTreeData();
	
	/**
	 * fetch the fire wall by id.
	 * @param id
	 * @return
	 */
	FirewallEntity getFireWallByID(String id);
	
	/**
	 * batch insert fire wall info.
	 * @param list
	 */
	void batchInserFireWall(List<FirewallEntity> list);
	
	/**
	 * 根据id更新防火墙信息
	 * @param firewallEntity
	 */
	void updateFirewallEntity(FirewallEntity firewallEntity);

	/**
	 * 根据vdiId查询防火墙列表
	 * @param vdiId
	 * @return
	 */
	List<FirewallEntity> queryFirewallEntityByVDIId(String vdiId);
	
	/**
	 * 
	 * @param firewallEntitys
	 * @return
	 */
	int batchUpdateFirewallEntity(List<FirewallEntity> firewallEntitys);
	
	/**
	 * insert into firewall entity.
	 * @param fe
	 * @return
	 */
	int insertFirewallInfo(FirewallEntity fe);
}
